package com.kaisa.activity.fragment;

import android.content.Intent;
import android.view.View;
import android.widget.TextView;

import com.kaisa.activity.R;
import com.kaisa.activity.ui.GetPasswordActivity;
import com.kaisa.activity.ui.RegistActivity;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.ViewInject;

/**
 * Created by 123 on 2015/12/16.
 */
@ContentView(R.layout.fragment_id)
public class IDFragment extends BaseFragment implements View.OnClickListener{

    @ViewInject(R.id.tv_id_regist)
    private TextView regist;
    @ViewInject(R.id.tv_id_psw)
    private TextView getPsw;

    public static IDFragment newInstance() {
        IDFragment fragment = new IDFragment();
        return fragment;
    }

    @Override
    public void initView() {
        super.initView();
        regist.setOnClickListener(this);
        getPsw.setOnClickListener(this);
    }

    @Override
    public void initData() {
        super.initData();
    }

    @Override
    public void onClick(View view) {
        if (view.getId() == R.id.tv_id_regist) {
            Intent intent = new Intent(getActivity(), RegistActivity.class);
            getActivity().startActivity(intent);
        } else if (view.getId() == R.id.tv_id_psw) {
            Intent intent = new Intent(getActivity(), GetPasswordActivity.class);
            getActivity().startActivity(intent);
        }
    }
}
